package com.msb.mall.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Author: lmf
 * @Create: 2025/3/8 14:55
 * Description:  缓存服务接口调用
 */
@FeignClient(value = "beacon-cache")
@RequestMapping("/cache")
public interface CacheClient {

    @PostMapping(value = "/hmset/{key}")
    void hmset(@PathVariable(value = "key") String key, @RequestBody Map<String, Object> map);

    @PostMapping(value = "/set/{key}")
    void set(@PathVariable(value = "key") String key, @RequestParam(value = "value") Object value);

    @PostMapping(value = "/sadd/{key}")
    void sadd(@PathVariable(value = "key") String key, @RequestBody Map<String, Object>... maps);

    @PostMapping(value = "/sadd/string/{key}")
    public void sAddString(@PathVariable(value = "key") String key, @RequestBody String... strs);
    @PostMapping("/pipeline/string")
    void pipelineString(@RequestBody Map<String, String> map);
}
